// $codepro.audit.disable
/**
 * Test for the planet
 */
import static org.junit.Assert.*;

import org.junit.Test;

/**
 * @author Lianghao Chen
 * @version $Revision: 1.0 $
 */

public class PlanetTest {
	
	/**
	 * Method toString.
	 * @return String
	 */
	@Override
	public String toString() {
		return "PlanetTest []";
	}

	/**
	 * Method test0.
	 */
	@Test
	public void test0() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		assertTrue(planet.toString().contains("ahhhh"));
	}

	/**
	 * Method test1.
	 */
	@Test
	public void test1() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		assertTrue(planet.toString().contains("" + planet.getChanceToEncounterPirates()));
	}

	/**
	 * Method test2.
	 */
	@Test
	public void test2() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		assertTrue(planet.toString().contains("" + planet.getChanceOfSavedByPolice()));
	}

	/**
	 * Method test3.
	 */
	@Test
	public void test3() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		assertTrue(planet.toString().contains("" + planet.getMoneyRobbedByPirates()));
	}

	/**
	 * Method test4.
	 */
	@Test
	public void test4() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		assertTrue(planet.toString().contains("" + planet.getTaxRatio()));
	}

	/**
	 * Method test5.
	 */
	@Test
	public void test5() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.setName("ohhh");
		assertTrue(planet.getName().equals("ohhh"));
	}

	/**
	 * Method test6.
	 */
	@Test
	public void test6() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.setChanceOfSavedByPolice(88.88);
		assertEquals(planet.getChanceOfSavedByPolice(), 88.88, 0.0000001);
	}

	/**
	 * Method test7.
	 */
	@Test
	public void test7() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.setChanceToEncounterPirates(45.67);
		assertEquals(planet.getChanceToEncounterPirates(), 45.67, 0.0000001);
	}

	/**
	 * Method test8.
	 */
	@Test
	public void test8() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.setMoneyRobbedByPirates(80);
		assertEquals(planet.getMoneyRobbedByPirates(), 80, 0.0000001);
	}

	/**
	 * Method test9.
	 */
	@Test
	public void test9() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.setTaxRatio(0.08);
		assertEquals(planet.getTaxRatio(), 0.08, 0.0000001);
	}

	/**
	 * Method test10.
	 */
	@Test
	public void test10() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.updateSpecialCondition();
		assertNotNull(planet.getSpecialConditionNo());
	}

	/**
	 * Method test11.
	 */
	@Test
	public void test11() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.updateSpecialCondition();
		assertFalse(planet.getSpecialCondition().equals(""));
	}

	/**
	 * Method test12.
	 */
	@Test
	public void test12() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.updateSpecialCondition();
		assertFalse(planet.getSpecialConditionNo() > 20);
	}

	/**
	 * Method test13.
	 */
	@Test
	public void test13() {
		new GameInfo();
		Planet planet=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		planet.updateSpecialCondition();
		assertFalse(planet.getSpecialConditionNo() < 0);
	}

	/**
	 * Method test14.
	 */
	@Test
	public void test14() {
		new GameInfo();
		Planet planet1=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		Planet planet2=new Planet("ahhhh",
			new SolarSystem("ahhSOLAR", 123, 456), 125, 500);
		assertNotSame(planet1, planet2);
	}
}
